package com.ficus.road.maintain.core.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum SeverityType {
    MILD("MILD"),

    MODERATE("MODERATE"),

    SEVERE("SEVERE");

    private String value;

    SeverityType(String value) {
            this.value = value;
        }

    @JsonCreator
    public static SeverityType fromValue(String value) {
        for (SeverityType b : SeverityType.values()) {
            if (b.value.equals(value)) {
                return b;
            }
        }
        throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    @Override
    @JsonValue
    public String toString() {
            return String.valueOf(value);
    }

}
